package com.itlong.cloud.noncore.operate;

import com.itlong.cloud.POJO.DTO.operate.*;
import com.itlong.cloud.POJO.VO.operate.OperatePaperGetVO;
import com.itlong.cloud.POJO.VO.operate.OperatePaperImgGetVO;
import com.itlong.cloud.utils.page.Page;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * <desc>
 *     运营-系统管理-说明书管理暴露接口
 * </desc>
 *
 * @createDate 2018/06/27
 */
@FeignClient("non-core-service")
public interface IOperatePaperServiceClient {

    /**
     * <desc>
     *     分页获取说明书信息
     * </desc>
     *
     * @param operatePaperGetPageDTO 说明书管理分页查询说明书数据传输对象
     * @return 分页查询结果对象
     * @author wangzhi
     * @createDate 2018/06/27
     */
    @PostMapping(path = "operate/paper/getPapersByPage")
    Page<OperatePaperGetVO> getPapersByPage(@RequestBody OperatePaperGetPageDTO operatePaperGetPageDTO) throws Exception;

    /**
     * <desc>
     *     精确查询单个说明书信息
     * </desc>
     *
     * @param operatePaperGetOneDTO 说明书管理单个精确查询说明书数据传输对象
     * @return 单个结果查询对象
     * @author wangzhi
     * @createDate 2018/06/28
     */
    @PostMapping(path = "operate/paper/getOnePaper")
    OperatePaperGetVO getOnePaper(@RequestBody OperatePaperGetOneDTO operatePaperGetOneDTO) throws Exception;

    /**
     * <desc>
     *      保存说明书信息
     * </desc>
     *
     * @param operatePaperSaveDTO 说明书管理保存说明书数据传输对象
     * @return 受影响的行数
     * @throws Exception 不可预见性异常
     * @author wangzhi
     * @createDate 2018/06/28
     */
    @PostMapping(path = "operate/paper/savePaper")
    Integer savePaper(@RequestBody OperatePaperSaveDTO operatePaperSaveDTO) throws Exception;

    /**
     * <desc>
     *      修改说明书信息
     * </desc>
     *
     * @param operatePaperUpdateDTO 说明书管理修改说明书数据传输对象
     * @return 受影响的行数
     * @author wangzhi
     * @createDate 2018/06/29
     */
    @PostMapping(path = "operate/paper/updatePaper")
    Integer updatePaper(@RequestBody OperatePaperUpdateDTO operatePaperUpdateDTO) throws Exception;

    /**
     * <desc>
     *      删除说明书信息
     * </desc>
     *
     * @param paperId 说明书id
     * @return 受影响的行数
     * @author wangzhi
     * @createDate 2018/06/29
     */
    @PostMapping(path = "operate/paper/deletePaper")
    Integer deletePaper(@RequestParam("paperId") String paperId) throws Exception;

    /**
     * <desc>
     *      查看说明书详情
     * </desc>
     *
     * @param operatePaperImgGetDTO 查询参数
     * @return 获取说明书详情信息VO
     * @author wangzhi
     * @createDate 2018/07/02
     */
    @PostMapping(path = "operate/paper/getPaperImg")
    OperatePaperImgGetVO getPaperImg(@RequestBody OperatePaperImgGetDTO operatePaperImgGetDTO) throws Exception;

    /**
     * <desc>
     *      添加说明书详情
     * </desc>
     *
     * @param operatePaperImgSaveOrUpdateDTO 添加数据参数
     * @return 受影响的行数
     * @author wangzhi
     * @createDate 2018/07/02
     */
    @PostMapping(path = "operate/paper/savePaperImg")
    Integer savePaperImg(@RequestBody OperatePaperImgSaveOrUpdateDTO operatePaperImgSaveOrUpdateDTO) throws Exception;

    /**
     * <desc>
     *      编辑(替换)说明书详情图片
     * </desc>
     *
     * @param operatePaperImgSaveOrUpdateDTO 修改数据参数
     * @return 受影响的行数
     * @author wangzhi
     * @createDate 2018/07/02
     */
    @PostMapping(path = "operate/paper/updatePaperImg")
    Integer updatePaperImg(@RequestBody OperatePaperImgSaveOrUpdateDTO operatePaperImgSaveOrUpdateDTO) throws Exception;

    /**
     * <desc>
     *      删除说明书详情
     * </desc>
     * @param operatePaperImgDeleteDTO 删除说明书详情数据传输对象
     * @return 受影响的行数
     * @throws Exception
     * @author wangzhi
     * @createDate 2018/07/02
     */
    @PostMapping(path = "operate/paper/deletePaperImg")
    Integer deletePaperImg(@RequestBody OperatePaperImgDeleteDTO operatePaperImgDeleteDTO) throws Exception;
}
